from langchain.document_loaders import PyPDFLoader

loader = PyPDFLoader("test1_2.pdf")
pages = loader.load_and_split()
for page in pages:
    print(type(page))
    # <class 'langchain_core.documents.base.Document'>
    print(page)
    # {page_content='xxx',metadata={'source': 'test1_2.pdf', 'page': 2}}
